import zhipuai




zhipuai.api_key = "41805a5412196acfdd9d63a905f9039a.Z0TWy2173NoP1ZkI"
response = zhipuai.model_api.invoke(
    model="chatglm_lite",
    prompt=[{"role": "user", "content": "你能干什么"}],
    temperature= 0.9,
    top_p= 0.7,
    incremental=True
)
print(response['data']['choices'][0]['content'])

